﻿using UnityEngine;
using System.Collections;

public class Teleport : MonoBehaviour, IInteractiveAction {
	
	private Transform to;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public void SetDestinations(Transform t) {
		to = t;
	}

	public string GetActionName() {
		return "Enter (PressX)";
	}
	
	public void Execute() {
		InteractiveObject owner = (InteractiveObject)this.gameObject.GetComponent(typeof(InteractiveObject));
		Transform teleportable = owner.actionTrigger;

		teleportable.position = to.position;
	}

	public void Stop() {

	}
}
